summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--Server/Plugins/DumpInfo/Init.lua4
-rw-r--r--src/Globals.h1
-rw-r--r--src/OSSupport/ServerHandleImpl.cpp3
-rw-r--r--src/WorldStorage/MapSerializer.cpp2
5 files changed, 8 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 660746445..db229a6f9 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -59,6 +59,7 @@ mcfadyeni
MeMuXin
mgueydan
MikeHunsinger
+mjagdis (Mike Jagdis)
Morritz (TJ)
morsmordere (Anzhelika Iugai)
mtilden
diff --git a/Server/Plugins/DumpInfo/Init.lua b/Server/Plugins/DumpInfo/Init.lua
index 723ab3d94..6f51aa4a6 100644
--- a/Server/Plugins/DumpInfo/Init.lua
+++ b/Server/Plugins/DumpInfo/Init.lua
@@ -23,7 +23,7 @@ function HandleDumpPluginRequest(a_Request)
-- Check if it already was requested to dump a plugin.
if (a_Request.PostParams["DumpInfo"] ~= nil) then
local F = loadfile("Plugins/InfoDump.lua")
- F("Plugins/" .. a_Request.PostParams["DumpInfo"])
+ F("Plugins/" .. cPluginManager:Get():GetPluginFolderName(a_Request.PostParams["DumpInfo"]))
end
Content = Content .. [[
@@ -36,7 +36,7 @@ function HandleDumpPluginRequest(a_Request)
cPluginManager:Get():ForEachPlugin(
function(a_Plugin)
-- Check if there is a file called 'Info.lua'
- if (cFile:IsFile("Plugins/" .. a_Plugin:GetName() .. "/Info.lua")) then
+ if (cFile:IsFile(a_Plugin:GetLocalFolder() .. "/Info.lua")) then
Content = Content .. "\n<tr>\n"
Content = Content .. "\t<td>" .. a_Plugin:GetName() .. "</td>\n"
Content = Content .. "\t<td><form method='POST'> <input type='hidden' value='" .. a_Plugin:GetName() .. "' name='DumpInfo'> <input type='submit' value='DumpInfo'></form></td>\n"
diff --git a/src/Globals.h b/src/Globals.h
index 0b6ff8ac5..7c2af3d11 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -98,6 +98,7 @@
#include <arpa/inet.h>
#include <netinet/in.h>
+ #include <netinet/tcp.h>
#include <sys/socket.h>
#include <unistd.h>
#endif
diff --git a/src/OSSupport/ServerHandleImpl.cpp b/src/OSSupport/ServerHandleImpl.cpp
index e68f82757..669a0f83f 100644
--- a/src/OSSupport/ServerHandleImpl.cpp
+++ b/src/OSSupport/ServerHandleImpl.cpp
@@ -328,6 +328,9 @@ void cServerHandleImpl::Callback(evconnlistener * a_Listener, evutil_socket_t a_
return;
}
+ const int one = 1;
+ setsockopt(a_Socket, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<const char *>(&one), sizeof(one));
+
// Create a new cTCPLink for the incoming connection:
cTCPLinkImplPtr Link = std::make_shared<cTCPLinkImpl>(a_Socket, LinkCallbacks, Self->m_SelfPtr, a_Addr, static_cast<socklen_t>(a_Len));
{
diff --git a/src/WorldStorage/MapSerializer.cpp b/src/WorldStorage/MapSerializer.cpp
index e68ad00e6..3e50740b3 100644
--- a/src/WorldStorage/MapSerializer.cpp
+++ b/src/WorldStorage/MapSerializer.cpp
@@ -18,7 +18,7 @@ cMapSerializer::cMapSerializer(const AString & a_WorldName, cMap * a_Map):
m_Map(a_Map)
{
auto DataPath = fmt::format(FMT_STRING("{}{}data"), a_WorldName, cFile::PathSeparator());
- m_Path = fmt::format(FMT_STRING("{}{}map_%i.dat"), DataPath, cFile::PathSeparator(), a_Map->GetID());
+ m_Path = fmt::format(FMT_STRING("{}{}map_{}.dat"), DataPath, cFile::PathSeparator(), a_Map->GetID());
cFile::CreateFolder(DataPath);
}